package STUDENT.TRANVIETHOANG.OOPs.Tinhtoan;

public class Models {
	public double pheptoan(tinhtoan obj) {
		double kq = 0;
		if (obj.getPheptoan() == "1") {
			kq = obj.getA() + obj.getB();
			return kq;
		}
		if (obj.getPheptoan() == "2") {
			kq = obj.getA() - obj.getB();
			return kq;
		}
		if (obj.getPheptoan() == "3") {
			kq = obj.getA() * obj.getB();
			return kq;
		}
		if (obj.getPheptoan() == "4") {
			kq = obj.getA() / obj.getB();
			return kq;
		}
		return kq;
	}
}